package com.liao.controller;


import com.liao.common.Result;
import com.liao.dto.StatisticsDTO;
import com.liao.service.StatisticService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/statistics")
public class StatisticController {

    @Resource
    private StatisticService statisticService;

    /**
     * 获取统计信息
     *
     * @return
     */
    @RequestMapping("/all")
    public Result<StatisticsDTO> getStatistics() {
        return Result.success(statisticService.getDashboardStatistics());
    }
}
